
package com.example.sortndk;

public class OhuangUtil {
    private OhuangUtil() {
    }

    private  static class OhuangUtil_{
        private static OhuangUtil ohuangUtil=new OhuangUtil();
    }
    public static OhuangUtil get(){
        return OhuangUtil_.ohuangUtil;
    }
    private boolean isInit=false;
    public String path="/libnative-lib.so";
    public  void init(String root){
        if (!isInit) {
            System.load(root+path);
        }

        isInit=true;
    }
    public static void sort(int[] a) {
        sort(a, a.length);
    }

    public static int[] sortForCopy(int[] a) {
        return sortForCopy(a, a.length);
    }

    public static native void sort(int[] a, int length);

    public static native int[] sortForCopy(int[] a, int length);


}
